<?php
set_time_limit(0); 
include '../c/config.php';

$mysqli = new mysqli($dbhost, $dbuser, $dbpwd, $dbName);

 
$j=0;
$query=$mysqli->query("SELECT * FROM `uinfo` WHERE `phone` LIKE '%del%'  ");
while ($list=$query->fetch_array()) {
      $phone=$list['phone'];
      $newphone=str_replace('-del', '', trim($phone));

      echo $phone,'.......',$newphone,'......',$list['id'];
      echo "<br />";

      $sql="update uinfo set phone='".$newphone."' where id='".$list['id']."' ";
                             $mysqli->query($sql);
   
}